package ms.maplestory.boot.client.character.quest.reward;

import lombok.Getter;
import lombok.Setter;
import ms.maplestory.boot.client.character.Char;
import ms.maplestory.boot.loaders.DatSerializable;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

@Getter
@Setter
public class QuestMoneyReward implements QuestReward {

    private long money;

    public QuestMoneyReward() {

    }

    public QuestMoneyReward(long money) {
        this.money = money;
    }


    @Override
    public void giveReward(Char chr) {

    }

    @Override
    public void write(DataOutputStream dos) throws IOException {
        dos.writeLong(getMoney());
    }

    @Override
    public DatSerializable load(DataInputStream dis) throws IOException {
        return new QuestMoneyReward(dis.readLong());
    }
}
